package cn.com.okgo.https;

import android.util.Log;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLSession;

/**
 * Created by luwenlong on 2017/9/7.
 */

public class SafeHostnameVerifier implements HostnameVerifier {
    @Override
    public boolean verify(String hostname, SSLSession session) {
        //验证主机名是否匹配
        //return hostname.equals("server.jeasonlzy.com");
        Log.e("SafeHostnameVerifier", "session:" + session);
        return true;
    }
}